<!DOCTYPE html>
<html xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta name="description" content="A fully featured admin theme which can be used to build CRM, CMS, etc.">
    <meta name="author" content="Coderthemes">

    <link rel="shortcut icon" href="/static/assets/images/favicon_1.ico">

    <title>导入</title>
    
	<!-- jQuery  -->
	<script src="/static/plugins/jquery-3/jquery.min.js"></script>
	
	<!-- layui  -->
	<link rel="stylesheet" href="/static/assets2/css/font.css">
	<link rel="stylesheet" href="/static/assets2/css/xadmin.css">
	<!-- <link rel="stylesheet" href="./css/theme5.css"> -->
	<script src="/static/plugins/layui/layui.js" charset="utf-8"></script>
	<script type="text/javascript" src="/static/assets2/js/xadmin.js"></script>
	
	<!-- font -->
	<link href="/static/plugins/bootstrap-fileinput/font/v5.5/all.css" rel="stylesheet" type="text/css">
	<script src="/static/plugins/bootstrap-4/extensions/popper.min.js"></script>

    <!--bootstrap-->
    <link href="/static/plugins/bootstrap-4/css/bootstrap.min.css" rel="stylesheet" type="text/css">
	<script src="/static/plugins/bootstrap-4/js/bootstrap.min.js"></script>
  
    <!--bootstrap-table-->
    <link href="/static/plugins/bootstrap-table-4/bootstrap-table.css" rel="stylesheet" type="text/css">
	<script src="/static/plugins/bootstrap-table-4/bootstrap-table.js"></script>
	<script src="/static/plugins/bootstrap-table-4/locale/bootstrap-table-zh-CN.min.js"></script>

	<!--bootstrap-editable-->
    <link href="/static/plugins/x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css" rel="stylesheet" type="text/css">
	<script src="/static/plugins/x-editable/dist//bootstrap3-editable/js/bootstrap-editable.min.js"></script>
	<script src="/static/plugins/bootstrap-table/extensions/editable/bootstrap-table-editable.js"></script>
	
    <!--bootstrap-table-sticky-header-->
    <link href="/static/plugins/bootstrap-table-4/extensions/sticky-header/bootstrap-table-sticky-header.min.css" rel="stylesheet" type="text/css">
	<script src="/static/plugins/bootstrap-table-4/extensions/sticky-header/bootstrap-table-sticky-header.min.js"></script>
	
    <!--bootstrap-table-export-->
	<script src="/static/plugins/tableExport/tableExport.min.js"></script>
	<script src="/static/plugins/tableExport/FileSaver.min.js"></script>
	<script src="/static/plugins/tableExport/xlsx.core.min.js"></script>
	<script src="/static/plugins/tableExport/jspdf.min.js"></script>
	<script src="/static/plugins/tableExport/jspdf.plugin.autotable.js"></script>
	<script src="/static/plugins/bootstrap-table-4/extensions/export/bootstrap-table-export.min.js"></script>

	<!-- kindeditor -->
	<script type="text/javascript" src="/static/plugins/kindeditor/kindeditor-all.js"></script>
	<script type="text/javascript" src="/static/plugins/kindeditor/lang/zh-CN.js"></script>
    
    <!-- jquery icheck-->
    <link href="/static/plugins/icheck/skins/all.css" rel="stylesheet" type="text/css">
    <link href="/static/plugins/icheck/skins/square/blue.css" rel="stylesheet" type="text/css">
	<script src="/static/plugins/icheck/js/icheck.min.js"></script>
	
	<!-- qiniu -->
	<script src="/static/assets/qiniu/plupload.full.min.js"></script>
	<script src="/static/assets/qiniu/qiniu.min.js"></script>
	<script src="/static/assets/qiniu/uploadWithSDK.js"></script>

	<!--bootstrap-fileinput-->
    <link href="/static/plugins/bootstrap-fileinput/css/fileinput.css" rel="stylesheet" type="text/css"/>
    <link href="/static/plugins/bootstrap-fileinput/themes/explorer-fas/theme.css" media="all" rel="stylesheet" type="text/css"/>
    <link href="/static/plugins/bootstrap-fileinput/font/v5.5/all.css" crossorigin="anonymous" rel="stylesheet">
	<script src="/static/plugins/bootstrap-fileinput/js/plugins/piexif.js" type="text/javascript"></script>
	<script src="/static/plugins/bootstrap-fileinput/js/plugins/sortable.js" type="text/javascript"></script>
	<script src="/static/plugins/bootstrap-fileinput/js/fileinput.js" type="text/javascript"></script>
	<script src="/static/plugins/bootstrap-fileinput/js/locales/zh.js" type="text/javascript"></script>
	
    <!--bootstrap-validator-->
    <link href="/static/plugins/bootstrap-validator/bootstrap-validator.min.css" rel="stylesheet" type="text/css">
	<script src="/static/plugins/bootstrap-validator/bootstrap-validator.min.js"></script>
	
	<!-- sweet alert  -->
    <link href="/static/plugins/sweetalert/sweetalert.css" rel="stylesheet" type="text/css">
	<!-- <script src="/static/plugins/sweetalert/sweetalert.min.js"></script> -->
	<script src="/static/plugins/sweetalert/sweetalert.min.js"></script>
	
	<!--bootstrap-treeview-->
    <link href="/static/plugins/bootstrap-treeview/css/bootstrap-treeview.min.css" rel="stylesheet" type="text/css">
	<script src="/static/plugins/bootstrap-treeview/js/bootstrap-treeview.min.js"></script>
	
	<!--bootstrap-switch-->
    <link href="/static/plugins/bootstrap-switch/bootstrap-switch.css" rel="stylesheet" type="text/css">
	<script src="/static/plugins/bootstrap-switch/bootstrap-switch.js"></script>
	
    <!--bootstrap-datetimepicker-->
	<script src="/static/plugins/moment/moment.js"></script>
    <link href="/static/plugins/bootstrap-datepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">
	<script src="/static/plugins/bootstrap-datepicker/js/bootstrap-datetimepicker.min.js"></script>
	<script src="/static/plugins/bootstrap-datepicker/js/bootstrap-datetimepicker.zh-CN.js"></script>

	<!-- bo -->
    <link href="/static/plugins/bo/bo.css" rel="stylesheet" type="text/css">
	<script src="/static/plugins/bo/bo.js"></script>

</head>

<body>


<div class="container-fluid">

	<div class="row">
		<div class="col-md-12">
			<div class="panel panel-default">
				<div class="panel-body">
					<form class="form-inline form-submit">
						
						<!-- inputs edit -->
						[(${inputsImportExcel})]
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary btn-submit">开始导入</button>
				</div>
			</div>
		</div>
	</div>
	<!-- End Row -->
</div>
<!-- container -->
<script>

	$(function () {
		
        // 保存按钮
        $('.btn-submit').click(function () {

    		$('.form-submit').bootstrapValidator('validate');
            if ($('.form-submit').data('bootstrapValidator').isValid()) {
                $.ajax({
                    type: "POST",
                    url: "/api/inter/[[${menu.menuTable}]]/importExcel",
                    data: $('.form-submit').serialize(),
                    success: function (data) {
                        if (data.code == 0) {
                        	swal("提示!", data.msg, "success");
                            
                            // 刷新父页面
                    		window.parent.refresh();
                        } else {
                            alert(data.msg);
                        }
                    }
                });
            }
        });
	});
</script>

</body>
</html>